<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/


Route::get('/', function () {
    return view('welcome');
});




// 文件上传
// Route::get('/upload','upload\UploadController@index');
// Route::post('/doupload','upload\UploadController@doupload');

// 后台路由群组
Route::group(['prefix' => 'admin','middleware' => 'login'],function(){
	//后台首页
	Route::resource('/demo3','Admin\AdminController');
	// 用户管理
	Route::resource('/demo4','Admin\UserController');
	// 用户退出
	Route::get('/over','Admin\LoginController@over');
	//网站配置
	Route::resource('/conf','Admin\ConfController');
	//商品列表
	Route::resource('/goods','Admin\GoodsController');
	//商品分类
	Route::resource('/category','Admin\CategoryController');
	Route::get('/categorySon/{id}','Admin\CategoryController@createSon');
	Route::post('/categorySon','Admin\CategoryController@storeSon');
});

// 登录
Route::get('admin/login','Admin\LoginController@index');
Route::post('admin/dologin','Admin\LoginController@dologin');
// 验证码
Route::get('Admin/captch/{tmp}','Admin\LoginController@captch');

Route::group(['prefix' => 'home'],function(){
	//前台首页
});
